import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import './assets/css/common.css'
import './utils/vant'
import './utils/eventBus'
import {
  i18n,
  vantLocales
} from './utils/lang'
import router from './router'
import store from './store'
import './router/permission'
Vue.config.productionTip = false
vantLocales(i18n.locale)
var user = localStorage.getItem('user')
if (user) {
  store.commit('logMod/set', user)
}
var user = localStorage.getItem('user')
if (user) {
  store.commit('logMod/set', user)

}

if (localStorage.lang) {
  i18n.locale = localStorage.lang;
} else {
  i18n.locale = "zh"
}
new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')